/**
 * Created by L.jp
 * Description:
 * User: 86189
 * Date: 2021-10-07
 * Time: 21:23
 */
public class BookList {
    private int usedSize=6;
    private  Book[] books =new Book[10];
    public  BookList(){
        this.books[0]=new Book("西游记","吴承恩",10,"名著");
        this.books[1]=new Book("红楼梦","曹雪芹",20,"名著");
        this.books[2]=new Book("三国演义","罗贯中",15,"名著");
        this.books[3]=new Book("水浒传","施耐庵",25,"名著");
        this.books[4]=new Book("活着","余华",31,"文学");
        this.books[5]=new Book("C语言程序设计","谭浩强",35,"计算机");

    }
    public int getSize(){
        return usedSize;
    }
    public void setSize(int size){
        this.usedSize=size;
    }
    public void setBooks(int pos, Book book){
        books[pos]=book;
    }
    public Book getBook(int pos){
        return books[pos];
    }
}
